package cn.itcast.day02.demo;

import com.sun.deploy.security.SelectableSecurityManager;

public class student {
    private String name;
    private int age;
    private boolean male;

    public void setMale(boolean b){
        male = b;
    }

    public boolean isMale() {
        return male;
    }

    public void setName(String str) {
        name = str;
    }

    public String getName() {
        return name;
    }

    public void setAge(int num) {
        if (num > 0 && num <100) {
            age = num;
        }else{
            System.out.println("数据输入错误");
        }
    }

    public int getAge() {
        return age;
    }


}
